package com.java.swing;

import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

public class SwingClient {

	public void creat(){
		JFrame frame = new JFrame("jframe");
		JLabel label = new JLabel("jlabel");
		frame.getContentPane().add(label, BorderLayout.CENTER);
		frame.addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosing(WindowEvent e) {
				System.exit(0);
			}
		});
		//frame.pack();
		frame.setSize(100,110);
		frame.setVisible(true);
	}

	public static void main(String[] args) {
		SwingClient client = new SwingClient();
		client.creat();
	}
}
